package com.xjrsoft.module.customerTwo.EMP.checkin_log.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.LocalDateTime;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


/**
 * 数据传输对象实体类
 *
 * @author lisen
 * @since 2023-07-21
 */
@Data
public class TElectricCheckinLogDto {
	private static final long serialVersionUID = 1L;


	@JsonProperty("room_id")
	private String roomId;

	@JsonProperty("fid")
	private String fid;

	@JsonProperty("identify_name")
	private String identifyName;

	@JsonProperty("identify_id")
	@Pattern(regexp = "^(\\d{6}(18|19|20)\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X|x))|(\\d{8}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3})$")
	private String identifyId;

	@JsonProperty("division")
	private String division;

	@JsonProperty("department")
	private String department;

	@JsonProperty("phone_number")
	//@Length(min = 11, max = 11, message = "手机号只能为11位")
	@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
	private String phoneNumber;

	@JsonProperty("checkin_date")
	private LocalDateTime checkinDate;

	@JsonProperty("is_couple_room")
	private Integer isCoupleRoom;

	@JsonProperty("room_number")
	@NotNull
	private String roomNumber;

	@JsonProperty("is_checkout")
	private Integer isCheckout;

	@JsonProperty("checkout_date")
	private LocalDateTime checkoutDate;

	@JsonProperty("islocked")
	private Integer islocked;

	@JsonProperty("workshop")
	private String workshop;

	@JsonProperty("gender")
	private Integer gender;

	/**
	 * 是否归还钥匙
	 */
	@JsonProperty("iskeyreturned")
	private Integer isKeyReturned;
	/**
	 * 是否是最后一人（退宿）
	 */
	@JsonProperty("islastone")
	private Integer isLastOne;

	@JsonProperty("item")
	private String item;
}
